﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace App
{
    public partial class ForumList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Common.GetLoggedUser(this.Page) == null)
            {
                Response.Redirect("Login.aspx");
                return;
            }
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            RepeaterTeams.DataSource = MidApp.ManageTeam.GetTeamsWhereUserIsAnyMember(Common.GetLoggedUser(this.Page).UserID);
            RepeaterTeams.DataBind();
        }
        protected void LinkButtonTeam_Click(object sender, EventArgs e)
        {
            Response.Cookies["ThreadList"].Value = ((LinkButton)sender).CommandArgument;
            Response.Redirect("ThreadList.aspx");
        }
    }
}